set PROJECT=mtl_proj
set MAIN_SOURCE=MessageTranslationLibrary
set JNI_DIR=jni
set JAVA_BASE_PACKAGE=rail.mtl.ada_native
set OLD_PATH=%PATH%

REM IMPORTANT: Point JAVA_32_BIT_DIR to the root of an installed 32-bit JRE or JDK (confirmed works with JDK 6 and JDK 7 - JRE likely works, too)
set JAVA_32_BIT_DIR=C:\Program Files (x86)\Java\jdk1.7.0
set PATH=%JAVA_32_BIT_DIR%\bin;%OLD_PATH%

rmdir /s /q %JNI_DIR%
rmdir /s /q rail
ada2java %MAIN_SOURCE%.ads NaturalListTypePkg.ads MessageTranslationTypes.ads --unaliased-access --no-java-enum -b %JAVA_BASE_PACKAGE% -o %JNI_DIR% -L %PROJECT%
gprbuild -p -P %JNI_DIR%\%PROJECT%.gpr

set PATH=%OLD_PATH%